<?php
declare (strict_types = 1);

namespace app\validate;

use think\Validate;

class User extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
	    'avatar|头像'=>'require',
	    'nickname|昵称'=>'require|unique:user',
	    'birthday|生日'=>'require|date',
	    'email|邮箱'=>'require|email|unique:user',
	    'height|身高'=>'require',
	    'city|城市'=>'require',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [];
}
